package com.job.ming.Zuoye0709;

import java.util.Scanner;

/**
 * @author Yangmingyu
 * @version 1.0
 * @since 2022-07-10 16:19:09
 */
public class Test {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("输入想要的车型：1轿车 2越野 3跑车");
        String a=sc.next();
        if ("1".equals(a)){
            Qiche qiche=new Jiaoche();
            qiche.show();
            Jiaoche jiaoche=new Jiaoche();
            jiaoche.power=100;
            jiaoche.size="M";
            System.out.print(jiaoche.power+"\n"+jiaoche.size);
        }else if ("2".equals(a)){
            Qiche qiche=new Yueye();
            qiche.show();
            Yueye yueye=new Yueye();
            yueye.power=100;
            yueye.wheel="M";
            System.out.print(yueye.power+"\n"+yueye.wheel);
        }else if ("3".equals(a)){
            Qiche qiche=new Runcar(400);
            qiche.show();
            Runcar runcar=new Runcar(400);
            runcar.speed=400;
            System.out.println(runcar.speed);
        }else {
            System.out.println("无合适车型");
        }
    }
}